<%@page import="com.kensure.shike.constant.BusiConstant"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<title>代金劵</title>
	<meta http-equiv="Content-Type" content="textml; charset=UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<link href="<%=BusiConstant.context%>/page1/webview/css/index.css" rel="stylesheet" type="text/css" media="all" />
	<script type="text/javascript" src="<%=BusiConstant.context%>/common/js/jquery.min.js"></script>
	<script type="text/javascript" src="<%=BusiConstant.context%>/common/js/jquery.cookie.js"></script>
	<script type="text/javascript" src="<%=BusiConstant.context%>/common/base.js?ver=<%=BusiConstant.version%>"></script>
	<script type="text/javascript" src="<%=BusiConstant.context%>/common/http.js?ver=<%=BusiConstant.version%>"></script>
	<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.0.js"></script>
</head>
<body class="loading">
	 

	<div class="wrapper">
		
	   	<div class="whole" id="list">
	   		
	   	</div>          
	</div>
</body>

<script>
var basecontext = '<%=BusiConstant.context%>';
var tokenid = getQueryVariable("token");

var pageNo = 1;
function getList(){
	var url = getbaseurl("/user/djqlist1.do");
	var data = {tokenid:tokenid,pageNo:pageNo};
	postdo(url, data, function(data){
		var rows = data.resultData.rows;
		for(var i=0;rows && i<rows.length;i++){
			var row = rows[i];
			showtable(row);
		}
		loadingmore = false;
	}, null, null);
}
getList();

function showtable(row){
	var html = '<div class="ations">'
	+'<strong>'
	+'<span>商家：'+row.changshang.name+' 余额:￥'+row.yue+'<br>最近使用时间：'+row.updatedTimeStr+'</span>'
	+'</strong>'
	+'</div>';
	$("#list").append(html);
}
function tourl(){
	wx.miniProgram.navigateTo({url: '/pages/dp/sp'});
}


$(window).scroll(function() {
	　　var scrollTop = $(this).scrollTop();
	　　var scrollHeight = $(document).height();
	　　var windowHeight = $(this).height();
	　　if(scrollTop + windowHeight == scrollHeight){
	　　		 loadMore();//加载数据的函数
	　　}
})
var loadingmore = false;
function loadMore(){
	if(loadingmore){
		return false;
	}
	loadingmore = true;
    pageNo++;
    getList();
}
</script>

</html>
